package com.limbo.showapp.rxHttp;

import com.limbo.showapp.base.BaseBean;
import com.limbo.showapp.bean.BannerBean;
import com.limbo.showapp.bean.CartoonBean;
import com.limbo.showapp.bean.HotBean;
import com.limbo.showapp.bean.MenuBean;
import com.limbo.showapp.bean.PictureBean;
import com.limbo.showapp.bean.RegisterBean;
import com.limbo.showapp.bean.VideoBean;

import okhttp3.ResponseBody;
import retrofit2.http.GET;
import retrofit2.http.Query;
import retrofit2.http.Streaming;
import retrofit2.http.Url;
import rx.Observable;

/**
 * Created by wangqi on 2018/8/24.
 */

public interface HttpService {

    @Streaming
    @GET
    Observable<ResponseBody> download(@Url String url);

    @GET("mimi_php/api/login.php")
    Observable<BaseBean> login(@Query("password") String password);

    @GET("mimi_php/api/register.php")
    Observable<RegisterBean> register(@Query("identification") String iden);

    @GET("mimi_php/api/banner.php")
    Observable<BannerBean> getBanner();

    @GET("mimi_php/api/menu.php")
    Observable<MenuBean> getMenu();

    @GET("mimi_php/api/hot.php")
    Observable<HotBean> getHotList();

    @GET("mimi_php/api/cartoonList.php")
    Observable<CartoonBean> getCartoonList(@Query("page") int page, @Query("size") int size);

    @GET("mimi_php/api/pictureList.php")
    Observable<PictureBean> getPictureList(@Query("page") int page, @Query("size") int size);

    @GET("mimi_php/api/videoList.php")
    Observable<VideoBean> getVideoList(@Query("page") int page, @Query("size") int size);


}
